<template>
  <div>
    <el-row class="elRow" :gutter="30" type="flex" justify="start">
      <el-col :span="6">
        <span class="large warehouse">{{ $t('market.saleUnit') }}<!--销售单位--></span>
        <el-input
          v-model.trim="company.fsaleUnit"
          size="mini"
          class="input-width"
          disabled
        />
      </el-col>
      <el-col :span="6">
        <span class="large">{{ $t('market.outStocklmth') }}<!--超发上限(%)--></span>
        <el-input-number
          v-model.number="company.foutStocklmth"
          controls-position="right"
          size="mini"
          :disabled="detailDisabled"
          :min="0"
          class="input-width"
        />
      </el-col>
      <el-col :span="6">
        <span class="large">{{ $t('market.outStocklmtl') }}<!--超发下限(%)--></span>
        <el-input-number
          v-model.number="company.foutStocklmtl"
          controls-position="right"
          size="mini"
          :min="0"
          :disabled="detailDisabled"
          class="input-width"
        />
      </el-col>
    </el-row>
  </div>
</template>

<script>

export default {
  name: 'Index',
  props: {
    company: {
      type: Object,
      default: () => {
        return {}
      }
    },
    unit: {
      type: Object,
      default: () => {
        return {}
      }
    },
    detailDisabled: {
      type: Boolean,
      default: false
    },
    detailShow: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
    }
  },
  watch: {
    unit(ev) {
      this.$set(this.company, 'fsaleUnitId', ev.fid)
      this.$set(this.company, 'fsaleUnit', ev.fname)
    }
  }
}
</script>

<style scoped lang="scss">
.elRow {
  display: flex;
  flex-wrap: wrap;
  .large {
    font-size: 14px;
    color: #606266;
    line-height: 40px;
    padding: 0 12px 0 12px;
    font-weight: 700;
  }
  .warehouse::before {
    content: '*';
    padding-right: 2px;
    color: red;
  }
  .input-width {
    width: 185px;
  }
  .el-icon-search {
    cursor: pointer;
  }
}
.el-table ::v-deep .el-table__body-wrapper {
  height: 480px;
}
</style>
